package team.freeroom.hotelmanage.service.impl;

import team.freeroom.hotelmanage.repository.entity.Menu;
import team.freeroom.hotelmanage.repository.mapper.MenuMapper;
import team.freeroom.hotelmanage.service.MenuService;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuMapper menuMapper;

    @Override
    public int add(Menu menu) {
        return menuMapper.add(menu);
    }

    @Override
    public List<Menu> findList(Map<String, Object> queryMap) {
        return menuMapper.findList(queryMap);
    }

    @Override
    public List<Menu> findTopList() {
        return menuMapper.findTopList();
    }

    @Override
    public int getTotal(Map<String, Object> queryMap) {
        return menuMapper.getTotal(queryMap);
    }

    @Override
    public int edit(Menu menu) {
        return menuMapper.edit(menu);
    }

    @Override
    public int delete(Long id) {
        return menuMapper.delete(id);
    }

    @Override
    public List<Menu> findChildernList(Long parentId) {
        return menuMapper.findChildernList(parentId);
    }

    @Override
    public List<Menu> findListByIds(String ids) {
        return menuMapper.findListByIds(ids);
    }

}
